home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / BORL_TIP / TI100 / TI101.ASC next >
Text File  |  1991-09-11  |  1KB  |  67 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.   PRODUCT : TURBO PASCAL                               NUMBER : 101
  10.   VERSION : ALL
  11.        OS : CP/M-80, CP/M-86, MS-DOS, PC-DOS
  12.      DATE : April 7, 1986                                PAGE : 1/1
  13.     TITLE : COMMAND LINE MANIPULATION
  14.  
  15.  
  16.  
  17.  
  18.   This program allows access to the command line buffer on  MS-DOS
  19.   computers. An absolute address variable is located at offset 80
  20.   hex past the start of the code segment. This is the location of
  21.   the DOS command line buffer. This program as it stands will only
  22.   work on 16 bit MS-DOS terminals. In order to make this program
  23.   work with CPM/80 simply delete the CSEG reserved word out of the
  24.   command line buffer declaration.
  25.  
  26.  
  27.   program CommandLine;
  28.   type  string127  = string[127];
  29.  
  30.   var   Buffer   : string127;
  31.         I        : integer;
  32.  
  33.     procedure CmdLine(var Buffer : string127); {procedure to get}
  34.                                                {command line}
  35.     var   ParamBuff : string127 absolute cseg:$80;
  36.     begin
  37.       buffer : = ParamBuff;          {Assign the command to}
  38.     end;                             {the parameter buffer}
  39.  
  40.   begin { Main }
  41.     CmdLine(Buffer);          { Get command line }
  42.     For I := 1 to 6 Do        { Space down the screen 6 lines. }
  43.       writeln;                { Write the command buffer }
  44.     writeln('l', Buffer,'l');
  45.     Delay(3000);
  46.   end.
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.